function initTicketModel(sequelize, DataTypes) {
    const Ticket = sequelize.define('ticket', {
        tid: {
            type: DataTypes.INTEGER,
            primaryKey: true,
            autoIncrement: true,
            field: 'tid'
        },
        uid: {
            type: DataTypes.INTEGER,
            allowNull: false,
            field: 'uid',
            comment: '用户id'
        },
        name: {
            type: DataTypes.STRING(255),
            allowNull: false,
            comment: '门票名称'
        },
        desc: {
            type: DataTypes.TEXT,
            comment: '门票描述'
        },
        content: {
            type: DataTypes.TEXT,
            comment: '门票内容'
        },
    }, {
        tableName: 'ticket',
        timestamps: false
    });
    
    return Ticket;
}

module.exports = initTicketModel;
